A semiconductor device includes, for example, a contact portion for electrically connecting a semiconductor layer and a wiring layer or a contact portion for electrically connecting wiring layers. The contact portion is obtained by forming a contact hole. The contact hole is formed by patterning of a photoresist by lithography and by etching of insulating film using the patterned photoresist as a mask.
During the formation of the contact hole, when there is a large step height difference in the surface of the insulating film, it is difficult to form a contact hole in a lower step portion and a contact hole in an upper step portion at the same time. When the sizes of the contact holes are small, it is more difficult to form the contact holes.
It is difficult to form the contact holes because the step height difference in the surface of the insulating film may exceeds a focus margin of a lithography tool. When the step height difference in the surface of the insulating film is greater than the focus margin of the lithography tool, a size of the contact hole may differ from the design values or the contact hole my not be opened.
When the size of the contact hole is not equal to the design values, a contact failure, such as a variation in contact resistance or an increase in contact resistance, occurs. In addition, when the contact hole is not opened, a contact failure, such as the disconnection between wiring lines, occurs. The contact failure causes the degradation of the characteristics of the semiconductor device.